<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FabGL: fabgl::MouseClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FabGL
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classfabgl_1_1_mouse_class.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classfabgl_1_1_mouse_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">fabgl::MouseClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The PS2 Mouse controller class.  
 <a href="classfabgl_1_1_mouse_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="mouse_8h_source.html">mouse.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for fabgl::MouseClass:</div>
<div class="dyncontent">
<div class="center"><img src="classfabgl_1_1_mouse_class__inherit__graph.png" border="0" usemap="#fabgl_1_1_mouse_class_inherit__map" alt="Inheritance graph"/></div>
<map name="fabgl_1_1_mouse_class_inherit__map" id="fabgl_1_1_mouse_class_inherit__map">
<area shape="rect" id="node2" href="classfabgl_1_1_p_s2_device_class.html" title="Base class for PS2 devices (like mouse or keyboard). " alt="" coords="5,5,162,31"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for fabgl::MouseClass:</div>
<div class="dyncontent">
<div class="center"><img src="classfabgl_1_1_mouse_class__coll__graph.png" border="0" usemap="#fabgl_1_1_mouse_class_coll__map" alt="Collaboration graph"/></div>
<map name="fabgl_1_1_mouse_class_coll__map" id="fabgl_1_1_mouse_class_coll__map">
<area shape="rect" id="node2" href="classfabgl_1_1_p_s2_device_class.html" title="Base class for PS2 devices (like mouse or keyboard). " alt="" coords="5,5,162,31"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a878bf60d657dac3cd8be49da5b3671fc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a878bf60d657dac3cd8be49da5b3671fc">availableStatus</a> ()</td></tr>
<tr class="memdesc:a878bf60d657dac3cd8be49da5b3671fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of available mouse status.  <a href="#a878bf60d657dac3cd8be49da5b3671fc">More...</a><br /></td></tr>
<tr class="separator:a878bf60d657dac3cd8be49da5b3671fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28c8955ed672180519e6f6e74ea676d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a28c8955ed672180519e6f6e74ea676d2">begin</a> (gpio_num_t clkGPIO, gpio_num_t dataGPIO)</td></tr>
<tr class="memdesc:a28c8955ed672180519e6f6e74ea676d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> specifying CLOCK and DATA GPIOs.  <a href="#a28c8955ed672180519e6f6e74ea676d2">More...</a><br /></td></tr>
<tr class="separator:a28c8955ed672180519e6f6e74ea676d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a004a4383e2fd553ee521b76eff4bf8f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a004a4383e2fd553ee521b76eff4bf8f7">begin</a> (int PS2Port)</td></tr>
<tr class="memdesc:a004a4383e2fd553ee521b76eff4bf8f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> without initializing the PS/2 controller.  <a href="#a004a4383e2fd553ee521b76eff4bf8f7">More...</a><br /></td></tr>
<tr class="separator:a004a4383e2fd553ee521b76eff4bf8f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0118a17387e775436fc27dc8380259f6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a0118a17387e775436fc27dc8380259f6">deltaAvailable</a> ()</td></tr>
<tr class="memdesc:a0118a17387e775436fc27dc8380259f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines the number of mouse movements available in the queue.  <a href="#a0118a17387e775436fc27dc8380259f6">More...</a><br /></td></tr>
<tr class="separator:a0118a17387e775436fc27dc8380259f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42d3fcce8c74d47e3e40c5552c4c2af4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a42d3fcce8c74d47e3e40c5552c4c2af4">getNextDelta</a> (<a class="el" href="structfabgl_1_1_mouse_delta.html">MouseDelta</a> *delta, int timeOutMS=-1, bool requestResendOnTimeOut=false)</td></tr>
<tr class="memdesc:a42d3fcce8c74d47e3e40c5552c4c2af4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets a mouse movement from the queue.  <a href="#a42d3fcce8c74d47e3e40c5552c4c2af4">More...</a><br /></td></tr>
<tr class="separator:a42d3fcce8c74d47e3e40c5552c4c2af4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af770cea972dce81506216a8556f086cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfabgl_1_1_mouse_status.html">MouseStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#af770cea972dce81506216a8556f086cd">getNextStatus</a> (int timeOutMS=-1)</td></tr>
<tr class="memdesc:af770cea972dce81506216a8556f086cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the next status from the status queue.  <a href="#af770cea972dce81506216a8556f086cd">More...</a><br /></td></tr>
<tr class="separator:af770cea972dce81506216a8556f086cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a3cfd9086abb1d0dda31e5f9c22f40e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enumerations.html#ga209a520f6108c21bd313cb2c98fde74a">PS2Device</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_class.html#a6a3cfd9086abb1d0dda31e5f9c22f40e">identify</a> ()</td></tr>
<tr class="memdesc:a6a3cfd9086abb1d0dda31e5f9c22f40e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identifies the device attached to the PS2 port.  <a href="#a6a3cfd9086abb1d0dda31e5f9c22f40e">More...</a><br /></td></tr>
<tr class="separator:a6a3cfd9086abb1d0dda31e5f9c22f40e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a998451f10299799fc5e9d486ede6c87f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a998451f10299799fc5e9d486ede6c87f">isMouseAvailable</a> ()</td></tr>
<tr class="memdesc:a998451f10299799fc5e9d486ede6c87f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if mouse has been detected and correctly initialized.  <a href="#a998451f10299799fc5e9d486ede6c87f">More...</a><br /></td></tr>
<tr class="separator:a998451f10299799fc5e9d486ede6c87f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c5e9c28380d81e8ca53875e7bf30e5c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_class.html#a0c5e9c28380d81e8ca53875e7bf30e5c">lock</a> (int timeOutMS)</td></tr>
<tr class="memdesc:a0c5e9c28380d81e8ca53875e7bf30e5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets exclusive access to the device.  <a href="#a0c5e9c28380d81e8ca53875e7bf30e5c">More...</a><br /></td></tr>
<tr class="separator:a0c5e9c28380d81e8ca53875e7bf30e5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cc375e93093a149fb6133d206a6f390"><td class="memItemLeft" align="right" valign="top">int &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a7cc375e93093a149fb6133d206a6f390">movementAcceleration</a> ()</td></tr>
<tr class="memdesc:a7cc375e93093a149fb6133d206a6f390"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or set mouse movement acceleration factor.  <a href="#a7cc375e93093a149fb6133d206a6f390">More...</a><br /></td></tr>
<tr class="separator:a7cc375e93093a149fb6133d206a6f390"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4ce42d726a0eb5afa812df27a391f51"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#ae4ce42d726a0eb5afa812df27a391f51">reset</a> ()</td></tr>
<tr class="memdesc:ae4ce42d726a0eb5afa812df27a391f51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a Reset command to the mouse.  <a href="#ae4ce42d726a0eb5afa812df27a391f51">More...</a><br /></td></tr>
<tr class="separator:ae4ce42d726a0eb5afa812df27a391f51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e894357caf95e95cb1d40fc709a0240"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a1e894357caf95e95cb1d40fc709a0240">setResolution</a> (int value)</td></tr>
<tr class="memdesc:a1e894357caf95e95cb1d40fc709a0240"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the resolution.  <a href="#a1e894357caf95e95cb1d40fc709a0240">More...</a><br /></td></tr>
<tr class="separator:a1e894357caf95e95cb1d40fc709a0240"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5703729d19c021a763c5ac819a72576"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#ad5703729d19c021a763c5ac819a72576">setSampleRate</a> (int value)</td></tr>
<tr class="memdesc:ad5703729d19c021a763c5ac819a72576"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum rate of mouse movements reporting.  <a href="#ad5703729d19c021a763c5ac819a72576">More...</a><br /></td></tr>
<tr class="separator:ad5703729d19c021a763c5ac819a72576"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf4c50d2b747ef1e2cc73ead1b0108bc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#adf4c50d2b747ef1e2cc73ead1b0108bc">setScaling</a> (int value)</td></tr>
<tr class="memdesc:adf4c50d2b747ef1e2cc73ead1b0108bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the scaling.  <a href="#adf4c50d2b747ef1e2cc73ead1b0108bc">More...</a><br /></td></tr>
<tr class="separator:adf4c50d2b747ef1e2cc73ead1b0108bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59dcb39ad1eef8cf2cd149b0fb306a00"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a59dcb39ad1eef8cf2cd149b0fb306a00">setUIApp</a> (<a class="el" href="classfabgl_1_1ui_app.html">uiApp</a> *app)</td></tr>
<tr class="memdesc:a59dcb39ad1eef8cf2cd149b0fb306a00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets current UI app.  <a href="#a59dcb39ad1eef8cf2cd149b0fb306a00">More...</a><br /></td></tr>
<tr class="separator:a59dcb39ad1eef8cf2cd149b0fb306a00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27d4c98be698b46eabc8faea1d1cf48d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a27d4c98be698b46eabc8faea1d1cf48d">setupAbsolutePositioner</a> (int width, int height, bool createAbsolutePositionsQueue, bool updateVGAController, <a class="el" href="classfabgl_1_1ui_app.html">uiApp</a> *app)</td></tr>
<tr class="memdesc:a27d4c98be698b46eabc8faea1d1cf48d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes absolute position handler.  <a href="#a27d4c98be698b46eabc8faea1d1cf48d">More...</a><br /></td></tr>
<tr class="separator:a27d4c98be698b46eabc8faea1d1cf48d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd37dd534acd79983406a7327f040123"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfabgl_1_1_mouse_status.html">MouseStatus</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#abd37dd534acd79983406a7327f040123">status</a> ()</td></tr>
<tr class="memdesc:abd37dd534acd79983406a7327f040123"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or sets current mouse status.  <a href="#abd37dd534acd79983406a7327f040123">More...</a><br /></td></tr>
<tr class="separator:abd37dd534acd79983406a7327f040123"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8745335a55407148cc1dc73f82597d02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a8745335a55407148cc1dc73f82597d02">terminateAbsolutePositioner</a> ()</td></tr>
<tr class="memdesc:a8745335a55407148cc1dc73f82597d02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminates absolute position handler.  <a href="#a8745335a55407148cc1dc73f82597d02">More...</a><br /></td></tr>
<tr class="separator:a8745335a55407148cc1dc73f82597d02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed4e98813779c2d51bd304aef5aed7e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_p_s2_device_class.html#aed4e98813779c2d51bd304aef5aed7e9">unlock</a> ()</td></tr>
<tr class="memdesc:aed4e98813779c2d51bd304aef5aed7e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Releases device from exclusive access.  <a href="#aed4e98813779c2d51bd304aef5aed7e9">More...</a><br /></td></tr>
<tr class="separator:aed4e98813779c2d51bd304aef5aed7e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf10d5722e7ac0eb3962bde2ba458bc5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#adf10d5722e7ac0eb3962bde2ba458bc5">updateAbsolutePosition</a> (<a class="el" href="structfabgl_1_1_mouse_delta.html">MouseDelta</a> *delta)</td></tr>
<tr class="memdesc:adf10d5722e7ac0eb3962bde2ba458bc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates absolute position from the specified mouse delta event.  <a href="#adf10d5722e7ac0eb3962bde2ba458bc5">More...</a><br /></td></tr>
<tr class="separator:adf10d5722e7ac0eb3962bde2ba458bc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5001a4b84fbc6c1ae7f2c909882649cb"><td class="memItemLeft" align="right" valign="top">int &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfabgl_1_1_mouse_class.html#a5001a4b84fbc6c1ae7f2c909882649cb">wheelAcceleration</a> ()</td></tr>
<tr class="memdesc:a5001a4b84fbc6c1ae7f2c909882649cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or sets wheel acceleration factor.  <a href="#a5001a4b84fbc6c1ae7f2c909882649cb">More...</a><br /></td></tr>
<tr class="separator:a5001a4b84fbc6c1ae7f2c909882649cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The PS2 Mouse controller class. </p>
<p><a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> connects to one port of the PS2 Controller class (<a class="el" href="classfabgl_1_1_p_s2_controller_class.html" title="The PS2 device controller class. ">fabgl::PS2ControllerClass</a>) to decode and get mouse movements.<br />
 At the moment <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> supports standard PS/2 mouse (X and Y axis with three buttons) and Microsoft Intellimouse compatible mouse (X and Y axis, scroll wheel with three buttons).<br />
 <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> allows to set movement parameters, like sample rate, resolution and scaling.<br />
 The PS2 controller uses ULP coprocessor and RTC slow memory to communicate with the PS2 device.<br />
 <br />
 Applications do not need to create an instance of <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> because an instance named Mouse is created automatically.<br />
 Because <a class="el" href="classfabgl_1_1_p_s2_controller_class.html" title="The PS2 device controller class. ">fabgl::PS2ControllerClass</a> supports up to two PS/2 ports, it is possible to have connected two PS/2 devices. The most common configuration is Keyboard on port 0 and Mouse on port 1. However you may have two mice connected at the same time using the Mouse instance on port 0 and creating a new one on port 1.<br />
</p>
<p>Example: </p><pre class="fragment">// Setup pins GPIO26 for CLK and GPIO27 for DATA
Mouse.begin(GPIO_NUM_26, GPIO_NUM_27);

if (Mouse.deltaAvailable()) {
  MouseDelta mouseDelta;
  Mouse.getNextDelta(&amp;mouseDelta);

  Serial.printf("deltaX = %d  deltaY = %d  deltaZ = %d  leftBtn = %d  midBtn = %d  rightBtn = %d\n",
                mouseDelta.deltaX, mouseDelta.deltaY, mouseDelta.deltaZ,
                mouseDelta.leftButton, mouseDelta.middleButton, mouseDelta.rightButton);
}</pre> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a878bf60d657dac3cd8be49da5b3671fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a878bf60d657dac3cd8be49da5b3671fc">&#9670;&nbsp;</a></span>availableStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::MouseClass::availableStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the number of available mouse status. </p>
<p>Mouse status contains absolute mouse position, scroll wheel delta and buttons status.<br />
 Mouse status queue is populated only when createAbsolutePositionsQueue parameter of <a class="el" href="classfabgl_1_1_mouse_class.html#a27d4c98be698b46eabc8faea1d1cf48d" title="Initializes absolute position handler. ">MouseClass.setupAbsolutePositioner()</a> is true.</p>
<dl class="section return"><dt>Returns</dt><dd>Number of available mouse status. </dd></dl>

</div>
</div>
<a id="a28c8955ed672180519e6f6e74ea676d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28c8955ed672180519e6f6e74ea676d2">&#9670;&nbsp;</a></span>begin() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::MouseClass::begin </td>
          <td>(</td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>clkGPIO</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gpio_num_t&#160;</td>
          <td class="paramname"><em>dataGPIO</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> specifying CLOCK and DATA GPIOs. </p>
<p>A reset command (<a class="el" href="classfabgl_1_1_mouse_class.html#ae4ce42d726a0eb5afa812df27a391f51" title="Sends a Reset command to the mouse. ">MouseClass.reset()</a> method) is automatically sent to the mouse.<br />
 This method also initializes the <a class="el" href="classfabgl_1_1_p_s2_controller_class.html" title="The PS2 device controller class. ">PS2ControllerClass</a> to use port 0 only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">clkGPIO</td><td>The GPIO number of Clock line </td></tr>
    <tr><td class="paramname">dataGPIO</td><td>The GPIO number of Data line</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Setup pins GPIO26 for CLK and GPIO27 for DATA
Mouse.begin(GPIO_NUM_26, GPIO_NUM_27);</pre> 
</div>
</div>
<a id="a004a4383e2fd553ee521b76eff4bf8f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a004a4383e2fd553ee521b76eff4bf8f7">&#9670;&nbsp;</a></span>begin() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::MouseClass::begin </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>PS2Port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes <a class="el" href="classfabgl_1_1_mouse_class.html" title="The PS2 Mouse controller class. ">MouseClass</a> without initializing the PS/2 controller. </p>
<p>A reset command (<a class="el" href="classfabgl_1_1_mouse_class.html#ae4ce42d726a0eb5afa812df27a391f51" title="Sends a Reset command to the mouse. ">MouseClass.reset()</a> method) is automatically sent to the mouse.<br />
 This method does not initialize the <a class="el" href="classfabgl_1_1_p_s2_controller_class.html" title="The PS2 device controller class. ">PS2ControllerClass</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">PS2Port</td><td>The PS/2 port to use (0 or 1).</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Setup pins GPIO26 for CLK and GPIO27 for DATA on port 0
PS2Controller.begin(GPIO_NUM_26, GPIO_NUM_27); // clk, dat
Mouse.begin(0); // port 0</pre> 
</div>
</div>
<a id="a0118a17387e775436fc27dc8380259f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0118a17387e775436fc27dc8380259f6">&#9670;&nbsp;</a></span>deltaAvailable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fabgl::MouseClass::deltaAvailable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determines the number of mouse movements available in the queue. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of mouse movements (deltas) available to read. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a13">MouseStudio/MouseStudio.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a33">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a42d3fcce8c74d47e3e40c5552c4c2af4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42d3fcce8c74d47e3e40c5552c4c2af4">&#9670;&nbsp;</a></span>getNextDelta()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::MouseClass::getNextDelta </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_mouse_delta.html">MouseDelta</a> *&#160;</td>
          <td class="paramname"><em>delta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMS</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>requestResendOnTimeOut</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets a mouse movement from the queue. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>Pointer to <a class="el" href="structfabgl_1_1_mouse_delta.html" title="Describes mouse movement and buttons status. ">MouseDelta</a> structure to be filled with mouse movement. May be nullptr if not required (in this case only Status().buttons is updated. </td></tr>
    <tr><td class="paramname">timeOutMS</td><td>Timeout in milliseconds. -1 means no timeout (infinite time). </td></tr>
    <tr><td class="paramname">requestResendOnTimeOut</td><td>If true and timeout has expired then asks the mouse to resend the mouse movement.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the mouse movement structure has been filled. False when there is no data in the queue.</dd></dl>
<p>Example: </p><pre class="fragment">MouseDelta mouseDelta;
Mouse.getNextDelta(&amp;mouseDelta);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a14">MouseStudio/MouseStudio.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a20">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="af770cea972dce81506216a8556f086cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af770cea972dce81506216a8556f086cd">&#9670;&nbsp;</a></span>getNextStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfabgl_1_1_mouse_status.html">MouseStatus</a> fabgl::MouseClass::getNextStatus </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMS</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the next status from the status queue. </p>
<p>Mouse status contains absolute mouse position, scroll wheel delta and buttons status.<br />
 Mouse status queue is populated only when createAbsolutePositionsQueue parameter of <a class="el" href="classfabgl_1_1_mouse_class.html#a27d4c98be698b46eabc8faea1d1cf48d" title="Initializes absolute position handler. ">MouseClass.setupAbsolutePositioner()</a> is true.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeOutMS</td><td>Timeout in milliseconds to wait for a new status. -1 = wait forever.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The next status in queue.</dd></dl>
<p>Example: </p><pre class="fragment">// wait for events from mouse and draw a pixel at the mouse position if left button is down
MouseStatus status = Mouse.getNextStatus();
if (status.buttons.left) {
  Canvas.setPenColor(Color::BrightRed);
  Canvas.setPixel(status.X, status.Y);
}</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a19">MouseOnScreen/MouseOnScreen.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a6a3cfd9086abb1d0dda31e5f9c22f40e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a3cfd9086abb1d0dda31e5f9c22f40e">&#9670;&nbsp;</a></span>identify()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___enumerations.html#ga209a520f6108c21bd313cb2c98fde74a">PS2Device</a> fabgl::PS2DeviceClass::identify </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Identifies the device attached to the PS2 port. </p>
<dl class="section return"><dt>Returns</dt><dd>The identification ID sent by keyboard. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_keyboard_studio_2_keyboard_studio_8ino-example.html#a1">KeyboardStudio/KeyboardStudio.ino</a>, and <a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a1">MouseStudio/MouseStudio.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a998451f10299799fc5e9d486ede6c87f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a998451f10299799fc5e9d486ede6c87f">&#9670;&nbsp;</a></span>isMouseAvailable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::MouseClass::isMouseAvailable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Checks if mouse has been detected and correctly initialized. </p>
<p><a class="el" href="classfabgl_1_1_mouse_class.html#a998451f10299799fc5e9d486ede6c87f" title="Checks if mouse has been detected and correctly initialized. ">isMouseAvailable()</a> returns a valid value only after <a class="el" href="classfabgl_1_1_mouse_class.html#a28c8955ed672180519e6f6e74ea676d2" title="Initializes MouseClass specifying CLOCK and DATA GPIOs. ">MouseClass.begin()</a> or <a class="el" href="classfabgl_1_1_mouse_class.html#ae4ce42d726a0eb5afa812df27a391f51" title="Sends a Reset command to the mouse. ">MouseClass.reset()</a> has been called.</p>
<dl class="section return"><dt>Returns</dt><dd>True if the mouse is correctly initialized. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a0">MouseStudio/MouseStudio.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a17">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a0c5e9c28380d81e8ca53875e7bf30e5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c5e9c28380d81e8ca53875e7bf30e5c">&#9670;&nbsp;</a></span>lock()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::PS2DeviceClass::lock </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMS</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets exclusive access to the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeOutMS</td><td>Timeout in milliseconds to wait before fail.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the device has been locked. </dd></dl>

</div>
</div>
<a id="a7cc375e93093a149fb6133d206a6f390"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cc375e93093a149fb6133d206a6f390">&#9670;&nbsp;</a></span>movementAcceleration()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int&amp; fabgl::MouseClass::movementAcceleration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets or set mouse movement acceleration factor. </p>
<p>Mouse movement acceleration is calculated in <a class="el" href="classfabgl_1_1_mouse_class.html#adf10d5722e7ac0eb3962bde2ba458bc5" title="Updates absolute position from the specified mouse delta event. ">MouseClass.updateAbsolutePosition()</a> and depends by the acceleration factor and time of call.<br />
 Lower values generate little acceleration, high values generate a lot of acceleration.<br />
 Suggested range is 0 ... 2000. Default value is 180. </p>

</div>
</div>
<a id="ae4ce42d726a0eb5afa812df27a391f51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4ce42d726a0eb5afa812df27a391f51">&#9670;&nbsp;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::MouseClass::reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a Reset command to the mouse. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the mouse is correctly initialized. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a9">MouseStudio/MouseStudio.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a1e894357caf95e95cb1d40fc709a0240"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e894357caf95e95cb1d40fc709a0240">&#9670;&nbsp;</a></span>setResolution()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::MouseClass::setResolution </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the resolution. </p>
<p>Resolution is the amount by which the movement counters are incremented/decremented measured as counts per millimeter.<br />
 The default resolution is 4 counts/mm.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Resolution encoded as follows: 0 = 1 count/mm (25 dpi), 1 = 2 counts/mm (50 dpi), 2 = 4 counts/mm (100 dpi), 3 = 8 counts/mm (200 dpi).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if command has been successfully delivered to the mouse. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a11">MouseStudio/MouseStudio.ino</a>.</dd>
</dl>
</div>
</div>
<a id="ad5703729d19c021a763c5ac819a72576"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5703729d19c021a763c5ac819a72576">&#9670;&nbsp;</a></span>setSampleRate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::MouseClass::setSampleRate </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the maximum rate of mouse movements reporting. </p>
<p>The default sample rate is 60 samples/sec.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Sample rate as samples per second. Valid values: 10, 20, 40, 60, 80, 100, and 200.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if command has been successfully delivered to the mouse. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a10">MouseStudio/MouseStudio.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a27">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="adf4c50d2b747ef1e2cc73ead1b0108bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf4c50d2b747ef1e2cc73ead1b0108bc">&#9670;&nbsp;</a></span>setScaling()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool fabgl::MouseClass::setScaling </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the scaling. </p>
<p>The default scaling is 1:1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Scaling encoded as follows: 1 = 1:1, 2 = 1:2.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if command has been successfully delivered to the mouse. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_studio_2_mouse_studio_8ino-example.html#a12">MouseStudio/MouseStudio.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a59dcb39ad1eef8cf2cd149b0fb306a00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59dcb39ad1eef8cf2cd149b0fb306a00">&#9670;&nbsp;</a></span>setUIApp()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::MouseClass::setUIApp </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classfabgl_1_1ui_app.html">uiApp</a> *&#160;</td>
          <td class="paramname"><em>app</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets current UI app. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">app</td><td>The UI app where to send mouse events </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a27d4c98be698b46eabc8faea1d1cf48d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27d4c98be698b46eabc8faea1d1cf48d">&#9670;&nbsp;</a></span>setupAbsolutePositioner()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::MouseClass::setupAbsolutePositioner </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>createAbsolutePositionsQueue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>updateVGAController</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classfabgl_1_1ui_app.html">uiApp</a> *&#160;</td>
          <td class="paramname"><em>app</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes absolute position handler. </p>
<p>Use this method to specify the absolute mouse area inside the rectangle (0, 0) to (width - 1, height - 1).<br />
 Optinally this method creates a queue that stores absolute positions generated by <a class="el" href="classfabgl_1_1_mouse_class.html#adf10d5722e7ac0eb3962bde2ba458bc5" title="Updates absolute position from the specified mouse delta event. ">updateAbsolutePosition()</a>.<br />
 This method must be called one time to initialize absolute positioning.<br />
</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">width</td><td>Absolute mouse area width. Mouse can travel from 0 up to width - 1. </td></tr>
    <tr><td class="paramname">height</td><td>Absolute mouse area height. Mouse can travel from 0 up to height - 1. </td></tr>
    <tr><td class="paramname">createAbsolutePositionsQueue</td><td>If true a queue of absolute positions is created. </td></tr>
    <tr><td class="paramname">updateVGAController</td><td>If true VGA controller mouse pointer is automatically updated. </td></tr>
    <tr><td class="paramname">app</td><td>Optional <a class="el" href="classfabgl_1_1ui_app.html" title="Represents the whole application base class. ">fabgl::uiApp</a> where to send mouse events.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">Mouse.setupAbsolutePositioner(Canvas.getWidth(), Canvas.getHeight(), true, true, nullptr);</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a9">MouseOnScreen/MouseOnScreen.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a28">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="abd37dd534acd79983406a7327f040123"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd37dd534acd79983406a7327f040123">&#9670;&nbsp;</a></span>status()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structfabgl_1_1_mouse_status.html">MouseStatus</a>&amp; fabgl::MouseClass::status </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets or sets current mouse status. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="_mouse_on_screen_2_mouse_on_screen_8ino-example.html#a18">MouseOnScreen/MouseOnScreen.ino</a>, and <a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a21">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a8745335a55407148cc1dc73f82597d02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8745335a55407148cc1dc73f82597d02">&#9670;&nbsp;</a></span>terminateAbsolutePositioner()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::MouseClass::terminateAbsolutePositioner </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Terminates absolute position handler. </p>

</div>
</div>
<a id="aed4e98813779c2d51bd304aef5aed7e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed4e98813779c2d51bd304aef5aed7e9">&#9670;&nbsp;</a></span>unlock()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::PS2DeviceClass::unlock </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Releases device from exclusive access. </p>

</div>
</div>
<a id="adf10d5722e7ac0eb3962bde2ba458bc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf10d5722e7ac0eb3962bde2ba458bc5">&#9670;&nbsp;</a></span>updateAbsolutePosition()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fabgl::MouseClass::updateAbsolutePosition </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfabgl_1_1_mouse_delta.html">MouseDelta</a> *&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Updates absolute position from the specified mouse delta event. </p>
<p>This method updates absolute mouse position, mouse wheel and buttons status.<br />
 In order to improve quality of acceleration it is important to call <a class="el" href="classfabgl_1_1_mouse_class.html#adf10d5722e7ac0eb3962bde2ba458bc5" title="Updates absolute position from the specified mouse delta event. ">updateAbsolutePosition()</a> often and at constant frequency.<br />
 <a class="el" href="classfabgl_1_1_mouse_class.html#adf10d5722e7ac0eb3962bde2ba458bc5" title="Updates absolute position from the specified mouse delta event. ">updateAbsolutePosition()</a> is automatically executed when updateVGAController or createAbsolutePositionsQueue parameters of <a class="el" href="classfabgl_1_1_mouse_class.html#a27d4c98be698b46eabc8faea1d1cf48d" title="Initializes absolute position handler. ">MouseClass.setupAbsolutePositioner()</a> is true.<br />
</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">delta</td><td>Mouse event to process.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// move a sprite (previously defined) at mouse absolute position
void loop() {
  MouseDelta delta;
  if (getNextDelta(&amp;delta)) {
    Mouse.updateAbsolutePosition(&amp;delta);
    mouseSprite.moveTo(Mouse.position().X, Mouse.position().Y);
  }
}</pre> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="_space_invaders_2_space_invaders_8ino-example.html#a34">SpaceInvaders/SpaceInvaders.ino</a>.</dd>
</dl>
</div>
</div>
<a id="a5001a4b84fbc6c1ae7f2c909882649cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5001a4b84fbc6c1ae7f2c909882649cb">&#9670;&nbsp;</a></span>wheelAcceleration()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int&amp; fabgl::MouseClass::wheelAcceleration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Gets or sets wheel acceleration factor. </p>
<p>Wheel acceleration is calculated in <a class="el" href="classfabgl_1_1_mouse_class.html#adf10d5722e7ac0eb3962bde2ba458bc5" title="Updates absolute position from the specified mouse delta event. ">MouseClass.updateAbsolutePosition()</a> and depends by the acceleration factor and time of call.<br />
 Lower values generate little acceleration, high values generate a lot of acceleration.<br />
 Suggested range is 0 ... 100000. Default value is 60000. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="mouse_8h_source.html">mouse.h</a></li>
<li>mouse.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>fabgl</b></li><li class="navelem"><a class="el" href="classfabgl_1_1_mouse_class.html">MouseClass</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
